             package com.java.diagnostics.visualizer.recommender;
             
             import com.java.diagnostics.visualizer.data.AggregateData;
             import com.java.diagnostics.visualizer.data.TupleData;
             import com.java.diagnostics.visualizer.recommender.util.RecommendationLabels;
             
             public class CheckForOptavgpause
               extends RecommendationBase
               implements Recommendation
             {
               private static final String OPTAVGPAUSE = "optavgpause";
               private static final String XGCPOLICY_GENCON = "-Xgcpolicy:gencon";
               private static final String XGCPOLICY = "-Xgcpolicy:";
               private static final String NURSERY_SIZE = "-Xmn";
               
               public void recommend(AggregateData data)
               {
                 Object gcMode = getGCMode(data);
                 if ("optavgpause".equals(gcMode))
                 {
                   boolean genconAvailable = genconAvailable(data);
                   if (genconAvailable) {
                     addWarning(data, RecommendationLabels.TRY_GENCON_NOT_OPTAVGPAUSE);
                     addToCommandLine(data, "-Xgcpolicy:", "-Xgcpolicy:gencon");
                     TupleData heapSize = data
                       .getTupleData("VGCLabels.flat.heap.size");
                     if ((heapSize != null) && (!heapSize.isEmpty()))
                     {
                       double mean = getMeanAsMB(heapSize);
                       int nurserySize = (int)(mean * 0.25D);
                       addToCommandLine(data, "-Xmn", "-Xmn" + nurserySize + 
                         "m");
                     }
                   }
                 }
               }
             }


